package cc.comac.mom.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import cc.comac.mom.api.EquipMaintainSpareReplaceService;
import cc.comac.mom.bean.EquipMaintainSpareReplace;
import cc.comac.mom.datahandlers.entity.EquipMaintainSpareReplaceDataHandler;
import cc.comac.mom.util.ResultBean;
@RestController
@Service
public class EquipMaintainSpareReplaceServiceImpl implements EquipMaintainSpareReplaceService{

	@Autowired
	private EquipMaintainSpareReplaceDataHandler equipMaintainSpareReplaceDataHandler;
	@Override
	public ResultBean selectSomeByFields(@RequestBody EquipMaintainSpareReplace equipMaintainSpareReplace) {
		ResultBean selectSomeByFields = equipMaintainSpareReplaceDataHandler.selectSomeByFields(equipMaintainSpareReplace);
		return selectSomeByFields;
	}

	@Override
	public ResultBean saveSpareReplace(@RequestBody List<EquipMaintainSpareReplace> spareReplaceList) {
		ResultBean saveSpareReplace = equipMaintainSpareReplaceDataHandler.saveSpareReplace(spareReplaceList);
		return saveSpareReplace;
	}
	@Override
	public ResultBean updateSpareReplace(@RequestBody List<EquipMaintainSpareReplace> spareReplaceList) {
		ResultBean updateSpareReplace = equipMaintainSpareReplaceDataHandler.updateSpareReplace(spareReplaceList);
		return updateSpareReplace;
	}
	@Override
	public ResultBean deleteSpareReplace(@RequestBody List<EquipMaintainSpareReplace> spareReplaceList) {
		ResultBean deleteSpareReplace = equipMaintainSpareReplaceDataHandler.deleteSpareReplace(spareReplaceList);
		return deleteSpareReplace;
	}

	@Override
	public ResultBean batchReplaceConfirm(@RequestBody List<EquipMaintainSpareReplace> spareReplaceList) {
		ResultBean batchReplaceConfirm = equipMaintainSpareReplaceDataHandler.batchReplaceConfirm(spareReplaceList);
		return batchReplaceConfirm;
	}

	@Override
	public ResultBean batchDemandConfirm(@RequestBody List<EquipMaintainSpareReplace> beanlist) {
		ResultBean batchDemandConfirm = equipMaintainSpareReplaceDataHandler.batchDemandConfirm(beanlist);
		return batchDemandConfirm;
	}

}
